<?php
require_once("Includes/connection.php");
require_once("Includes/functions.php");
$query = sprintf("SELECT * FROM polls WHERE short_name='%s'",$_GET['short_name']);
$result = mysql_query($query);
$info = mysql_fetch_assoc($result);
$entry_date=array();
$entry_from=array();
$entry_answer=array();
$entry_times=array();
get_tag_data_counter($_GET['short_name'], $info['sms_entries'], $info['web_entries'], $info['multiple_entries'], $entry_date, $entry_from, $entry_answer, $entry_times);
header("Content-Type: text/xml");
echo '<data>';
$counter=count($entry_date);
for($i=0; $i<$counter; $i++){
	echo "<entry>";
	echo '<answer>'.$entry_answer[$i].'</answer>';
	echo '<times>'.$entry_times[$i].'</times>';
	echo '</entry>';
}
echo '</data>';
?>